package com.itheima.string;

import java.util.Scanner;

public class Replace {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String ss = s.replace("TMD", "***");
        System.out.println(ss);
    }

}
